# -*- coding: utf-8 -*-
# @Time    : 2024/1/14 21:49
# @Author  : micah
# @File    : 28.让'.'匹配所有字符.py
# @Software: PyCharm
import re

content = """
<div class="el">
        <p class="t1">           
            <span>
                <a>Python开发工程师</a>
            </span>
        </p>
        <span class="t2">南京</span>
        <span class="t3">1.5-2万/月</span>
</div>
<div class="el">
        <p class="t1">
            <span>
                <a>java开发工程师</a>
            </span>
		</p>
        <span class="t2">苏州</span>
        <span class="t3">1.5-2/月</span>
</div>
"""


# 使用DOTALL设置 . 匹配任意内容
for temp in re.findall(r'class="t1">.*?<a>(.*?)</a>', content, re.DOTALL):
    print(temp)

